package com.springboot.astra.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.springboot.astra.bean.Carousel;
import com.springboot.astra.bean.Goods;
import com.springboot.astra.bean.Tag;

import java.util.List;

public interface GoodsMapper {
    Goods getOneById(Integer id);
    List<Goods> getAll();
    List<Tag> getTags(Integer id);
    List<Carousel> getCarousels(Integer id);
    IPage<Goods> pageGoodsVo(Page<Goods> page, String query);
    IPage<Goods> pageGoodsVoForUser(Page<Goods> page, String query);
    void insertGoods(Goods goods);
    void updateOneById(Goods goods);
    void deleteOneById(Goods goods);
}
